<h1>Transferência entre contas</h1>

<%= flash_alerts %>

<%= errors_for @transfer %>

<%= form_tag commit_transferencia_path do %>
	<fieldset>
		<div>
			<%= label :transfer, :origem, "Conta de origem", :class => "obrigatorio" %>
			<%= collection_select :transfer, :origem, current_usuario.contas, :id, :nome, :prompt => true %>
		</div>

		<div>
			<%= label :transfer, :destino, "Conta de destino", :class => "obrigatorio" %>
			<%= collection_select :transfer, :destino, current_usuario.contas, :id, :nome, :prompt => true %>
		</div>

		<div>
			<%= label :transfer, :valor, :class => "obrigatorio" %>
			<%= text_field :transfer, :valor, :class => "valor" %>
		</div>

		<div>
			<%= label :transfer, :data, :class => "obrigatorio" %>
			<%= text_field :transfer, :data, :class => "datepicker", :value => @transfer.data_formatada %>
		</div>

		<div>
			<%= label :transfer, :observacao %>
			<%= text_area :transfer, :observacao, :rows => 6, :class => "span6" %>
		</div>

	</fieldset>
	<%= submit_tag "Salvar", :class => "btn btn-primary" %>
<% end %>

